package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper;
import com.ruoyi.system.domain.DispatchSingleWaterQualityIndicatorQualifiedRateStats;
import com.ruoyi.system.service.IDispatchSingleWaterQualityIndicatorQualifiedRateStatsService;

/**
 * 单项水质合格率统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchSingleWaterQualityIndicatorQualifiedRateStatsServiceImpl implements IDispatchSingleWaterQualityIndicatorQualifiedRateStatsService 
{
    @Autowired
    private DispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper;

    /**
     * 查询单项水质合格率统计
     * 
     * @param singleWaterQualityIndicatorQualifiedRateStatsId 单项水质合格率统计主键
     * @return 单项水质合格率统计
     */
    @Override
    public DispatchSingleWaterQualityIndicatorQualifiedRateStats selectDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsId(Long singleWaterQualityIndicatorQualifiedRateStatsId)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.selectDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsId(singleWaterQualityIndicatorQualifiedRateStatsId);
    }

    /**
     * 查询单项水质合格率统计列表
     * 
     * @param dispatchSingleWaterQualityIndicatorQualifiedRateStats 单项水质合格率统计
     * @return 单项水质合格率统计
     */
    @Override
    public List<DispatchSingleWaterQualityIndicatorQualifiedRateStats> selectDispatchSingleWaterQualityIndicatorQualifiedRateStatsList(DispatchSingleWaterQualityIndicatorQualifiedRateStats dispatchSingleWaterQualityIndicatorQualifiedRateStats)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.selectDispatchSingleWaterQualityIndicatorQualifiedRateStatsList(dispatchSingleWaterQualityIndicatorQualifiedRateStats);
    }

    /**
     * 新增单项水质合格率统计
     * 
     * @param dispatchSingleWaterQualityIndicatorQualifiedRateStats 单项水质合格率统计
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchSingleWaterQualityIndicatorQualifiedRateStats(DispatchSingleWaterQualityIndicatorQualifiedRateStats dispatchSingleWaterQualityIndicatorQualifiedRateStats)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.insertDispatchSingleWaterQualityIndicatorQualifiedRateStats(dispatchSingleWaterQualityIndicatorQualifiedRateStats);
    }

    /**
     * 修改单项水质合格率统计
     * 
     * @param dispatchSingleWaterQualityIndicatorQualifiedRateStats 单项水质合格率统计
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchSingleWaterQualityIndicatorQualifiedRateStats(DispatchSingleWaterQualityIndicatorQualifiedRateStats dispatchSingleWaterQualityIndicatorQualifiedRateStats)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.updateDispatchSingleWaterQualityIndicatorQualifiedRateStats(dispatchSingleWaterQualityIndicatorQualifiedRateStats);
    }

    /**
     * 批量删除单项水质合格率统计
     * 
     * @param singleWaterQualityIndicatorQualifiedRateStatsIds 需要删除的单项水质合格率统计主键
     * @return 结果
     */
    @Override
    public int deleteDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsIds(Long[] singleWaterQualityIndicatorQualifiedRateStatsIds)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.deleteDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsIds(singleWaterQualityIndicatorQualifiedRateStatsIds);
    }

    /**
     * 删除单项水质合格率统计信息
     * 
     * @param singleWaterQualityIndicatorQualifiedRateStatsId 单项水质合格率统计主键
     * @return 结果
     */
    @Override
    public int deleteDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsId(Long singleWaterQualityIndicatorQualifiedRateStatsId)
    {
        return dispatchSingleWaterQualityIndicatorQualifiedRateStatsMapper.deleteDispatchSingleWaterQualityIndicatorQualifiedRateStatsBySingleWaterQualityIndicatorQualifiedRateStatsId(singleWaterQualityIndicatorQualifiedRateStatsId);
    }
}
